/**
 * Copyright (c) 2010 Basil Shikin, LegoCamera Project
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.legocam;

import lejos.nxt.ColorLightSensor;
import lejos.nxt.Motor;
import lejos.nxt.MotorPort;
import lejos.nxt.SensorPort;
import lejos.nxt.TachoMotorPort;
import lejos.nxt.TouchSensor;

public class CameraConstants
{
	public static final String KEY_ISO = "camera.iso";
	public static final String KEY_SNAPSHOTS_LEFT = "camera.snapshots";
	public static final String KEY_BODY_INSTALLED = "camera.body_installed";
	
	public static final String PROPERTIES_FILE = "camera.properties";
	
	public static final SensorPort LIGHT_SENSOR_PORT = SensorPort.PORTS[0];
	public static final SensorPort SNAPSHOT_BUTTON_PORT = SensorPort.PORTS[1];
	public static final SensorPort BODY_BUTTON_PORT = SensorPort.PORTS[2];
	
	public static final TachoMotorPort PRIMARY_REEL_PORT = MotorPort.A;
	public static final TachoMotorPort SECONDARY_REEL_PORT = MotorPort.B;
	public static final TachoMotorPort SHUTTER_PORT = MotorPort.C;
	
	
	public static final ColorLightSensor lightSensor = new ColorLightSensor( LIGHT_SENSOR_PORT, ColorLightSensor.TYPE_COLORNONE );
	public static final TouchSensor snapshotButton = new TouchSensor( SNAPSHOT_BUTTON_PORT );
	public static final TouchSensor bodySensor = new TouchSensor( BODY_BUTTON_PORT );
	
	public static final Motor primaryReelMotor = new Motor( PRIMARY_REEL_PORT );
	public static final Motor secondaryReelMotor = new Motor( SECONDARY_REEL_PORT );
	public static final Motor shutterMotor = new Motor( SHUTTER_PORT );
	
	public static final float PRIMARY_GEAR_COEFFICIENT = 1*3; // (direction)*(small gear reduction)
	public static final float SECONDARY_GEAR_COEFFICIENT = -1*2.8F; // (direction)*(small gear reduction)
	
	public static final int PRIMARY_MOTOR_SPEED = 450;
	public static final int SECONDARY_MOTOR_SPEED = 200;
}
